import http from ".";

/**
 * 教室列表
 */
const fetchList = () => http.get("/rooms");

/**
 * 添加教室
 * @param data
 */
const addItem = (data: { name: string }) => http.post("/rooms", data);

/**
 * 删除教室
 * @param id
 */
const removeItem = (id: string) => http.delete(`/rooms/${id}`);

export { fetchList, addItem, removeItem };
